<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>网站管理系统</title>

    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

    <link rel="shortcut icon" href="/favicon.ico"> 
    <link href="/public/admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/public/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/admin/css/animate.css" rel="stylesheet">
    <link href="/public/admin/css/style.css?v=4.0.0" rel="stylesheet">
    <link href="/public/admin/css/ourstyle.css?v=4.0.0" rel="stylesheet">

    <script src="/public/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/admin/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/public/admin/js/common.js"></script>
    <script src="/public/admin/js/myAjax.js"></script>
    <script src="/public/admin/js/plugins/layer/layer.min.js"></script>

    <!-- 自定义js -->
    <script src="/public/admin/js/content.js?v=1.0.0"></script>
    <!-- jQuery Validation plugin javascript-->
    <script src="/public/admin/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="/public/admin/js/plugins/validate/messages_zh.min.js"></script>
    
    <script src="/public/admin/js/demo/form-validate-demo.js"></script>
    <script src="/public/admin/plugins/ckeditor/ckeditor.js"></script>
    <script src="/public/admin/plugins/ckfinder/ckfinder.js"></script>
    <script src="/public/admin/js/article.js"></script> 
    <!-- iCheck -->
    <script src="/public/admin/js/plugins/iCheck/icheck.min.js"></script>
    
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <ul class="nav nav-tabs">
                            <li class="active"><a data-toggle="tab" href="#tab-1"> 基本设置</a></li>
                            <li style="display:none;"><a data-toggle="tab" href="#tab-3"><i class="fa fa-briefcase"></i> 商城设置</a>
                            </li>
                        </ul>
                    </div>
                    <div class="ibox-content" style="border-top:none;">
                        <div class="row">
                            <div class="tab-content">
                                <div id="tab-1" class="tab-pane active">
                                    <form action="{:url('System/saveconfig')}" method="post" id="configFrom" class="form-horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">网站名称：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_name" minlength="2" placeholder="请填写站点名称" type="text" value="{$config_data.site_name}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">网站LOGO：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <input type="text" class="form-control" name="site_logo" id="site_logo" placeholder="请选择站点头部LOGO" value="{$config_data.site_logo}"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="BrowseServer('site_logo');">选择图片</button> </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">网站底部LOGO：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <input type="text" class="form-control" name="foot_logo" id="foot_logo" placeholder="请选择站点LOGO" value="{$config_data.foot_logo}"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="BrowseServer('foot_logo');">选择图片</button> </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">网站二维码：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <input type="text" class="form-control" name="site_ewm" id="site_ewm" value="{$config_data.site_ewm}" placeholder="请选择站点二维码图片"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="BrowseServer('site_ewm');">选择图片</button> </span>
                                                </div>
                                            </div>
                                        </div> 
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">网站标签：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_hotword" type="text" value="{$config_data.site_hotword}" placeholder="输入多个请键入“|”进行分割">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">站点URL：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_url" type="text" value="{$config_data.site_url}">
                                            </div>
                                        </div>
                                        <!--<div class="form-group">
                                            <label class="col-sm-2 control-label">联系人：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="link_man" type="text" placeholder="请填写站点联系人" value="{$config_data.link_man}">
                                            </div>
                                        </div>-->
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">联系电话：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_tel" type="text" placeholder="请填写站点联系电话" value="{$config_data.site_tel}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">联系电话(2)：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_tel2" type="text" placeholder="请填写站点联系电话" value="{$config_data.site_tel2}">
                                            </div>
                                        </div>
                                        
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">网站邮箱：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_email" type="text" placeholder="请填写网站邮箱" value="{$config_data.site_email}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">公司地址：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_address" type="text" placeholder="请填写公司地址" value="{$config_data.site_address}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">企业微信号：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="site_weixin" type="text" placeholder="" value="{$config_data.site_weixin}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">咨询QQ：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="link_qq" type="text" placeholder="" value="{$config_data.link_qq}">
                                            </div>
                                        </div>
                                        
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">网站关键字：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="keyword" type="text" value="{$config_data.keyword}" placeholder="请填写站点关键词信息">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">网站描述：</label>
                                            <div class="col-sm-8">
                                                <textarea  class="form-control valid" name="description" style="height:70px;" placeholder="请填写站点描述信息">{$config_data.description}</textarea>
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">站点QQ：</label>
                                            <div class="col-sm-8">
                                                <textarea class="form-control valid" name="site_qq" style="height:70px;" placeholder="输入一个QQ号码跟昵称，使用“,”逗号分割（英文半角），如：『123456，张小姐』,多个QQ请键入“|”进行分割">{$config_data.site_qq}</textarea>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">网站版权：</label>
                                            <div class="col-sm-8">
                                                <textarea id="copyright" class="form-control valid" name="copyright" placeholder="请填写站点版权信息">{$config_data.copyright|raw}</textarea>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">统计代码：</label>
                                            <div class="col-sm-8">
                                                <textarea class="form-control valid" name="script_text" style="height:70px;" placeholder="此处可以放html代码，如：百度商桥代码">{$config_data.script_text}</textarea>
                                            </div>
                                        </div>
                                        <input type="hidden" name="inc_type" value="{$inc_type}">
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <div class="col-sm-4 col-sm-offset-2">
                                                <button class="btn btn-primary" onclick="ajax_submit_form('configFrom','{:url('System/saveconfig')}')" type="button">保存</button>
                                            </div>
                                        </div> 
                                    </form>
                                </div>

                                <div id="tab-3" class="tab-pane">
                                    <form action="{:url('System/saveShop')}" method="post" id="shopFrom" onclick="return false;" class="form-horizontal">
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">会员注册赠送积分：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="carry" minlength="2" type="text" value="{$shop.carry}" title="会员注册时赠送的积分数">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">默认运费：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="freight" minlength="2" type="text" value="{$shop.freight}">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">包邮设置：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="freight_discount" minlength="2" type="text" value="{$shop.freight_discount}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">会员优惠：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="user_discount" minlength="2" type="text" value="{$shop.user_discount}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">支付优惠：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="online_pay" minlength="2" type="text" value="{$shop.online_pay}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">获取积分算法：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="integral" minlength="2" type="text" value="{$shop.integral}">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display:none;">
                                            <label class="col-sm-2 control-label">使用积分算法：</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" name="gain" minlength="2" type="text" value="{$shop.gain}">
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <div class="col-sm-4 col-sm-offset-2">
                                                <button class="btn btn-primary" onclick="ajax_submit_form('shopFrom','{:url('System/saveShop')}')" type="button">保存</button>
                                            </div>
                                        </div> 
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>  
<script>
    $(document).ready(function () {
         CKEDITOR.replace( 'copyright', {  
            //编辑器初始化语言  
            language : 'zh-cn',  
            //编辑器初始化功能定制  
            toolbar : [  
                ['Source'],  
                // { name: 'document', items : [ 'DocProps' ] },  
                // { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },  
                // '/',  
                { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','-','RemoveFormat' ] },  
                // { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },  
                { name: 'links', items : [ 'Link','Unlink' ] },  
                // { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar' ] },  
                // '/',  
                { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },  
                // { name: 'colors', items : [ 'TextColor','BGColor' ] },  
                // { name: 'tools', items : [ 'Maximize', 'ShowBlocks', ] },  
            ],  
            //是否可以自行拖拽编辑器大小  
            resize_enabled : false,  
            //编辑器高度  
            height : '80px',  
            //编辑器宽度  
            // width : '1000px',  
        }); 
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    });
</script>
</body>
</html>
